<?php
    header("content-type:text/html;charset=utf8");

    $username = $_GET['username'];
    $phone = $_GET['phone'];

    // 链接
    $link = mysql_connect("localhost","root","root");
    mysql_query("set names utf8");
    // 选择
    mysql_select_db("test");
    // 编写sql: 注意前端传参的值注意给上引号
    $sql = "SELECT * FROM `userlist` WHERE `username`='$username' AND `phone`='$phone'";
    // 执行sql
    $res = mysql_query($sql);
    $arr = mysql_fetch_array($res);

    if($arr){
        echo 1;
    }else{
        echo 0;
    }

    // 关闭
    mysql_close($link);
?>